package com.hzhq.contract.repo;

import com.hzhq.contract.bean.entity.Admin;
import org.bson.types.ObjectId;
import org.springframework.data.domain.Page;
import org.springframework.data.domain.Pageable;
import org.springframework.data.mongodb.repository.MongoRepository;

import java.util.Optional;

/**
 * @author hzhq
 * @create 2021/3/29 3:20 下午
 * @email hzhq1255@163.com
 */
public interface AdminRepository extends MongoRepository<Admin, ObjectId> {


    Page<Admin> findByDeleted(Integer deleted, Pageable pageable);

    Optional<Admin> findByAdminIdAndDeleted(ObjectId adminId, Integer deleted);

    Optional<Admin> findByAdminNameAndDeleted(String adminName, Integer deleted);




}
